# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=kdnssd
pkgver=6.1.0
pkgrel=0
arch="all !armhf" # armhf blocked by extra-cmake-modules
pkgdesc="Network service discovery using Zeroconf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.0-or-later"
depends="avahi"
depends_dev="
	avahi-dev
	qt6-qtbase-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/kdnssd.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kdnssd-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
8d20f5b481872e52746a1605194354f4d0a56fefe091679c07e39e7d96330ab67b49b424c8568e74a027c028f8c01064311bdce6be8fe87fb81558a29326fb9f  kdnssd-6.1.0.tar.xz
"
